package com.mingliu;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
        ApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);

        SpringAsync obj = (SpringAsync) context.getBean("async");

        for (int i = 0; i < 100; i++){
            obj.async();
        }

        System.out.println(Thread.currentThread().getName() + ": main thread");

    }
}
